package LeaderElection;
import udpKuponServer.SouthMulticastServer;
import generalClasses.ProgramData;
import generalClasses.Server;
import LocalServerProtocols.AuthenticateLocalServer;
import LocalServerTcp.SouthLocalKuponsMultiServer;
import LocalServerTcp.TcpClient;
import LocalServerThreads.RegistrationThread;


public class TempRunLocalServer
{

	public static volatile int numOfMsgsSentNorth = 0;
	public static volatile int numOfMsgsSentCenter = 0;
	public static volatile int numOfMsgsSentSouth = 0;
	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		ProgramData programData=new ProgramData();
		Server notrhServer = new Server("Server of the north",
										programData.getNorthServerAdress(),
										programData.getNorthServerPort(),
										ProgramData.LOCAL_SERVER, 
										ProgramData.ONLINE, 
										ProgramData.NORTH);
		
		
		RegistrationThread registrationThread = new RegistrationThread( notrhServer );
		registrationThread.start();

		String[] emptyStringArray = {};
		try
		{
			SouthMulticastServer sms = new SouthMulticastServer();
			sms.main( emptyStringArray );
			
//			SouthLocalKuponsMultiServer slkms = new SouthLocalKuponsMultiServer();
//			slkms.main( emptyStringArray );
		}
		catch (Exception e)
		{
			// TODO: handle exception
			e.printStackTrace();
			System.err.println("Exception cought in TempRunLocalServer: "+ e.getMessage() );
		}
	}

}